import dayjs from 'dayjs'
require('dayjs/locale/zh-cn')
dayjs.locale('zh-cn') // 全局使用简体中文
var relativeTime = require('dayjs/plugin/relativeTime')
dayjs.extend(relativeTime)

export const formatTime = (val) => {
  return dayjs(val).to(dayjs())
}
